<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>机器人</title>
  </head>
  <body>
    <script type="text/javascript">
      function jiqiren(say){
        var says = say;
        switch (say) {
          case '呦':
          console.log("土豆");
          break;
          case '呦呦':
          console.log('切可闹');
          break;
          case '你好':
          console.log('你好');
          break;
          case '你是谁？':
          console.log('我是机器人');
          break;
          case '你有名字吗？':
          console.log('我叫土豆');
          break;
          case '你都会什么？':
          console.log('简单的对话');
          break;
          case '你会说谢谢吗？':
          console.log('谢谢');
          break;
          case '拜拜':
          console.log('拜拜');
          break;
          default:

        }
      }
    jiqiren('呦');
    jiqiren('呦呦');
    jiqiren('你好');
    jiqiren('你是谁？');
    jiqiren('你有名字吗？');
    jiqiren('你都会什么？');
    jiqiren('你会说谢谢吗？');
    jiqiren('拜拜');
    </script>
      </body>
</html>
